package org.xlp.validate.code;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Description: 图片验证码生成接口
 * <br/>date: 2024/12/2 23:32
 *
 * @version 1.0
 * @author: xlp
 */
public interface IValidateCode {
    /**
     * 把图片验证码写入输出流
     *
     * @param outputStream
     * @throws IOException
     */
    void write(OutputStream outputStream) throws IOException;

    /**
     * 获取图片对象
     * @return
     */
    BufferedImage getBuffImg();

    /**
     * 获取验证码
     * @return
     */
    String getCode();
}
